<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<h:head>
	<link rel="stylesheet"
		href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
	</link>
	<title>Activity planner</title>

</h:head>

<h:body>

	<h1>#{activityBean.currentActivity.name}</h1>

	<h:form class="text-info"
		action="#{activityBean.saveAction(activityBean.currentActivity)}"
		method="POST">
		<table>

			<tr>
				<td><label path="name"> Activity </label></td>
				<td><h:inputText id="name" value="#{activityBean.currentActivity.name}"
						size="20" required="true" label="Name">
					</h:inputText></td>
			</tr>
			<tr>
				<td><label path="startDate"> Start date </label></td>
				<td><p:calendar value="#{activityBean.currentActivity.startDate}"
						id="startDate" binding="#{startDate}" showOn="button"
						converterMessage="Invalid Date" pattern="dd.MM.yyyy"
						navigator="true" required="true" yearRange="-100"
						title="Start date">
					</p:calendar></td>
			</tr>
			<tr>
				<td><label path="dueDate"> Due date </label></td>
				<td><p:calendar value="#{activityBean.currentActivity.dueDate}" id="dueDate"
						binding="#{dueDate}" showOn="button"
						converterMessage="Invalid Date" pattern="dd.MM.yyyy"
						navigator="true" required="true" yearRange="-100" title="Due date">

					</p:calendar></td>
			</tr>

			<tr>
				<td><h:commandButton value="Save" class="btn-info btn"
						action="#{activityBean.saveAction(activityBean.currentActivity)}" /></td>
			</tr>
		</table>
	</h:form>

</h:body>
</html>